package com.ry.utils;

import com.ry.common.CommonResult;

/**
 * @author ry
 * @since 2021-11-09 17:26
 **/
public class ResultUtil {
    public static <T> CommonResult<T> success(){
        return new CommonResult<>(200,"操作成功",null);
    }

    public static <T> CommonResult<T> success(T data){
        return new CommonResult<>(200,"操作成功",data);
    }

    public static <T> CommonResult<T> fail(){
        return new CommonResult<>(500,"操作失败",null);
    }
}
